package ys.demo1.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import ys.demo1.pojo.User;

@Configuration
public class UserConfig {

    /*
    <beans ....>            @Configuration
        <bean id="user1" class="com.qf.firstspringboot.entity.User" />
    </beans>
     */
    @Bean
    public User user(){
        User user = new User();
        user.setName("张三");
        user.setSex("男");
        return user;
    }

}
